package com.sanss.trapParse.info;

import java.util.ArrayList;

public class TrapInfo {

	private String sender;

	private long timestamp;

	private int version;// snmp4j trap version
	// for smiv1 trap only
	private int genericTrap;
	private int specificTrap;

	private ArrayList<TrapPDU> trapPDU = new ArrayList<TrapPDU>();

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getSender() {
		return sender;
	}

	public void addTrapPDU(TrapPDU trapPDU) {
		this.trapPDU.add(trapPDU);
	}

	public ArrayList<TrapPDU> getTrapPDU() {
		return trapPDU;
	}

	public long getTimestamp() {
		timestamp = System.currentTimeMillis();
		return timestamp;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public int getVersion() {
		return version;
	}

	public void setGenericTrap(int genTrap) {
		this.genericTrap = genTrap;
	}

	public int getGenericTrap() {
		return genericTrap;
	}

	public void setSpecificTrap(int specTrap) {
		this.specificTrap = specTrap;
	}

	public int getSpecTrap() {
		return specificTrap;
	}

	public TrapInfo() {
		genericTrap = -1;
		specificTrap = -1;
	}

}
